<button type="button" id="btnTest">测试</button>
<script>
    document.getElementById("btnTest").addEventListener("click", () => {
        alert("ok")
    }, false);
</script>